'''
Description: description
Author: 
LastEditors: M
'''
import pandas as pd
import compoments.utils as U
def load_setting(fp):
    d = pd.read_excel(fp)
    head = ['id','base_cfg_file','amend_cfg','save_dir','name','state','info']
    for h in head:
        if h not in d.keys():
            U.errormsg(f"{U._warning_(h)} not in setting file header",emphasis=fp)
            exit(-1)
    return d